package com.ruibang.glass.produce.mapper;

import com.ruibang.glass.produce.domain.req.CommonTrendChartReq;
import com.ruibang.glass.produce.domain.req.DefectAnalysisReq;
import com.ruibang.glass.produce.domain.resp.DefectSizePieRateData;
import com.ruibang.glass.produce.domain.resp.DissolutionDefectData;
import com.ruibang.glass.produce.entity.DefectSizeAnalysis;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 缺陷大小数据分析 Mapper 接口
 * </p>
 *
 * @author songJinKang
 * @since 2024-04-27
 */
@Mapper
public interface DefectSizeAnalysisMapper extends CommonMapper<DefectSizeAnalysis> {

    DefectSizePieRateData pieRateChart(@Param("commonReq") CommonTrendChartReq commonTrendChartReq);

    DefectSizeAnalysis getLastHourData(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    List<DissolutionDefectData> defectChart(@Param("defectAnalysisReq") DefectAnalysisReq defectAnalysisReq);

    List<DefectSizeAnalysis> barChart(@Param("defectAnalysisReq") DefectAnalysisReq defectAnalysisReq);
}
